{% extends 'layout/main.html' %}
{% from "bootstrap/pagination.html" import render_pagination %}
{% block content %}
<div class="box">
  <div class="box-header">
	<h3 class="box-title">砍价商品列表</h3>
  </div>
  <!-- /.box-header -->
  <div class="box-body no-padding">
	<table class="table table-bordered">
	  <tbody>
		<tr>
		  <th style="width: 10px">#</th>
		  <th>商品名称</th>
		  <th>已砍人数</th>
		  <th>已砍价格</th>
		  <th>添加时间</th>
		  <th style="width: 140px">操作</th>
		</tr>
		{% for item in model %}
		<tr>
		  <td>{{ loop.index }}</td>
		  <td>{{ item.title }}</td>
		  <td>{{ item.content }}</td>
		  <td>{{ item.content }}</td>
		  <td>{{ item.created_at }}</td>
          <td>
            <a href="/garage/view?id=3878" title="查看"><span class="glyphicon glyphicon-eye-open"></span></a> 
            <a href="{{ url_for('backend.news_update', id=item.id) }}" title="更新"><span class="glyphicon glyphicon-pencil"></span></a> 
            <a href="/garage/delete?id=3878" title="删除"><span class="glyphicon glyphicon-trash"></span></a>
          </td>
		</tr>
		{% endfor %}
	  </tbody>
	</table>
  </div>
  <!-- /.box-body -->

  <div class="box-footer">
	<div class="box-tools">
        {{render_pagination(pagination)}}
	</div>
  </div>
</div>
<!-- /.box -->
{% endblock %}
